]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
network: fix iterating connections in NMConnectionSection
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 18 Aug 2013 17:52:12 +0000 (19:52 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 18 Aug 2013 20:05:45 +0000 (22:05 +0200)
Must compare the length of the array, not the array itself.

https://bugzilla.gnome.org/show_bug.cgi?id=706262

js/ui/status/network.js

index c2a2686a420c06a53c884c0e763a0b0eaa013e0c..fb84e3219b4a5fbda8d8bf34b6e0411e2bee1f8d 100644 (file)
@@ -187,7 +187,7 @@ const NMConnectionSection = new Lang.Class({
 
     _getStatus: function() {
         let values = this._connectionItems.values();
-        for (let i = 0; i < values; i++) {
+        for (let i = 0; i < values.length; i++) {
             let item = values[i];
             if (item.isActive())
                 return item.getName();